#include <iostream>
#include <cctype>
using namespace std;
 
int main() 
{
    string str, ret = "", tmp = "";
    cin >> str;
    int n = str.size();
    for(int i = 0; i <= n; i++)
    {
        if(isdigit(str[i]))
        {
            tmp += str[i]; // 进窗口
        }
        else
        {
            if(tmp.size() > ret.size())
            {
                ret = tmp;
            }
            else 
            {
                tmp = "";
            }
        }
    }
    cout << ret;
    return 0;
}